package chaozuo;

import bbb.Booklist;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 18128
 * Date: 2023-09-25
 * Time: 21:49
 */
public class jieyue implements ZG{
    public void work(Booklist bookl)
    {
        System.out.println("输入你要借阅图书的名字");
        Scanner sss=new Scanner(System.in);
        String nnn=sss.next();
        for (int i = 0; i < bookl.getNums(); i++) {
            if(bookl.getBrr()[i].getName().equals(nnn))
            {
                bookl.getBrr()[i].setIsborrow(true);
                System.out.println("借阅成功");
            }
        }
    }
}
